<?php
echo '<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="CSS/test1.css"/> 	
<script type="text/javascript" src="JS/javascript.js"></script>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body onResize = "changeImage();" onload="alert(\'Website Loaded\');">
	<div id="divOne" onclick="move(this)" ondblclick="alert(\'You double clicked\');" > Test1</div>
	<div id="divTwo" onclick="move(this)" ondblclick="alert(\'You double clicked\');" >Test2</div>
	<img id = "brain" src="img/brain.jpg" 
				onclick="alertme(this);" 
				onMouseOver=changeColor(); 
				onMouseOut="changeAgain()">
		
	<form name="formex">
	        <input type="text" name="mousex"/>Mouse X Position<br />
	        <input type="text" name="mousey"/>Mouse Y Position<br />
	        <input type="text" name="keypress"/>Key Pressed<br />
	        <input type="text" name="mousebutton"/>Mouse Button Pressed<br />
	         
	    </form>
		
		<!--		THE SCRIPT NEEDS THE FORM TO BE READY TO WORK WITH IT! -->
		<!--		THE SCRIPT NEEDS THE FORM TO BE READY TO WORK WITH IT! -->
		<!--		THE SCRIPT NEEDS THE FORM TO BE READY TO WORK WITH IT! -->
		<!--		THE SCRIPT NEEDS THE FORM TO BE READY TO WORK WITH IT! -->
		<!--		THE SCRIPT NEEDS THE FORM TO BE READY TO WORK WITH IT! -->
		<!--		THE SCRIPT NEEDS THE FORM TO BE READY TO WORK WITH IT! -->
		
	    <script language="javascript" type="text/javascript">
	        var mie = (navigator.appName == "Microsoft Internet Explorer")?true:false;
	         
	        if (!mie)
	        {
	            document.captureEvents(Event.MOUSEMOVE); // Specifies that you want all mouse movement events passed to the document
	            document.captureEvents(Event.MOUSEDOWN);
	        }
        
	        document.onkeypress = keyPressed;
	        document.onmousemove = mousePos;
	        document.onmousedown = mouseClicked;
	        var mouseClick = 0;
	        var keyClicked = 0;
	        var mouseX = 0;
	        var mouseY = 0;
	         
	        function mousePos(e)
	        {
	            if (!mie)
	            {
	                mouseX = e.pageX;
	                mouseY = e.pageY;
	            }
	            else
	            {
	                mouseX = event.clientX + document.body.scrollLeft;
	                mouseY = event.clientY + document.body.scrollTop;
	            }
	             
	            document.formex.mousex.value = mouseX;
	            document.formex.mousey.value = mouseY;
	            return true;
        	}
		function keyPressed(e)
	        {
	            if (mie)
	            {
	                e = window.event;
	                keyClicked = e.keyCode;
	            }
	            else
	            {
	                keyClicked = String.fromCharCode(e.charCode); // Converts char code to character
	            }
	             
	            if (!keyClicked)
	            {
	                return false;
	            }
	            document.formex.keypress.value = keyClicked;
	            return true;
	        }
	         
	        function mouseClicked(e)
	        {
	            if (mie)
	            {
	                switch(event.button)
	                {
	                    case 0:
	                     document.formex.mousebutton.value = "Left";
	                     break;
	                     case 1:
	                     document.formex.mousebutton.value = "Middle";
	                     break;
	                     default:
	                      document.formex.mousebutton.value = "Right";
	                      break;
	                }
	                return false;
	                 
	            }
	            else
	            {
	                switch(e.which)
	                {
	                    case 1:
	                     document.formex.mousebutton.value = "Left";
	                     break;
	                     case 2:
	                     document.formex.mousebutton.value = "Middle";
	                     break;
	                     default:
	                      document.formex.mousebutton.value = "Right";
	                      break;
	                }
	                return true;
	            }
        }
	</script>
</body>
</html>';
?>